using System;
using Volo.Abp.Domain.Entities;

namespace ERP.Team.WarehouseManagement
{
    /// <summary>
    /// 来料检验实体
    /// </summary>
    public class IncomingInspection : Entity<int>
    {
        /// <summary>
        /// 来料检验单编号
        /// </summary>
        public string IncomingInspectionCode { get; set; }

        /// <summary>
        /// 来料检验单名称
        /// </summary>
        public string IncomingInspectionName { get; set; }

        /// <summary>
        /// 供应商简称
        /// </summary>
        public string IncomingInspectionJName { get; set; }

        /// <summary>
        /// 供应商批次号
        /// </summary>
        public string Batch { get; set; }

        /// <summary>
        /// 产品物料编号
        /// </summary>
        public string ProductCode { get; set; }

        /// <summary>
        /// 产品物料名称
        /// </summary>
        public string ProductName { get; set; }

        /// <summary>
        /// 接收数量
        /// </summary>
        public int? ReceiveNum { get; set; }

        /// <summary>
        /// 检测数量
        /// </summary>
        public int? TestingNum { get; set; }

        /// <summary>
        /// 不合格数
        /// </summary>
        public int? UnqualifiedNum { get; set; }

        /// <summary>
        /// 检测结果
        /// </summary>
        public string TestingResult { get; set; }

        /// <summary>
        /// 来料日期
        /// </summary>
        public DateTime IncomingDate { get; set; }

        /// <summary>
        /// 检测日期
        /// </summary>
        public DateTime TestingDate { get; set; }

        /// <summary>
        /// 检测人员
        /// </summary>
        public string TestingPerson { get; set; }

        /// <summary>
        /// 单据状态 (0=草稿，1=已确认，2=已完成)
        /// </summary>
        public int? State { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }

        protected IncomingInspection()
        {
        }

        public IncomingInspection(
            string incomingInspectionCode,
            string incomingInspectionName,
            string incomingInspectionJName,
            string batch,
            string productCode,
            string productName,
            string testingResult,
            DateTime incomingDate,
            DateTime testingDate,
            string testingPerson,
            int? receiveNum = null,
            int? testingNum = null,
            int? unqualifiedNum = null,
            int? state = 0)
        {
            IncomingInspectionCode = incomingInspectionCode;
            IncomingInspectionName = incomingInspectionName;
            IncomingInspectionJName = incomingInspectionJName;
            Batch = batch;
            ProductCode = productCode;
            ProductName = productName;
            TestingResult = testingResult;
            IncomingDate = incomingDate;
            TestingDate = testingDate;
            TestingPerson = testingPerson;
            ReceiveNum = receiveNum;
            TestingNum = testingNum;
            UnqualifiedNum = unqualifiedNum;
            State = state;
            CreateTime = DateTime.Now;
        }
    }
} 